<?php

class ExceptionModel extends BaseModel
{
    var $table  = 'exception';
    var $prikey = 'e_tid';
    var $_name  = 'exception';
    
var $_relation  = array(

        // 一个运单有多个运程
        'has_attr' => array(
            'model'         => 'exattr',
            'type'          => HAS_MANY,
            'foreign_key'   => 'ea_e_tid',
            'dependent'     => true
        ),
        
          // 一个运单异常有一个用户
        'belongs_to_operator' => array(
            'model'         => 'member',
            'type'          => BELONGS_TO,
            'foreign_key'   => 'user_id',
            'reverse'       => 'has_operator',
        ),
    );
}
?>